<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>字符串大小写转换</title>
</head>

<body>
    <script type="text/javascript">
        let txt = "Hello World";
        document.write("正常显示：" + txt + "</p>");
        document.write("小写方式显示：" + txt.toLowerCase() + "</p>");
        document.write("大写方式显示：" + txt.toUpperCase() + "</p>");
        document.write("按照本地方式把字符串转化为小写：" + txt.toLocaleLowerCase() + "</p>");
        document.write("按照本地方式把字符串转化为大写：" + txt.toLocaleUpperCase() + "</p>");
    </script>

</body>

</html>